﻿//初始化对话框值
function initializeGridItemInDialog(container, item) {
    var $this = container;
    for (attr in item) {
        $this.find('[prop=' + attr + ']').val(item[attr]);
    }
}

//把对话框内容保存在dialogResult中
function saveDialogDataAsDialogResult(container) {
    //var $form = $(form);
    if (!container.valid()) {
        return false;
    }
    dialogResult = {};
    container.find('[prop]').each(function () {
        dialogResult[$(this).attr('prop')] = $(this).val();
    });
    $.pdialog.closeCurrent();
}